package com.test.group6.service.Ipml;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.test.group6.domain.WorkesInformation;
import com.test.group6.mapper.WorkesSelectMapper;
import com.test.group6.service.WorkesSelectService;

@Service
public class WorkesSelectServiceImpl implements WorkesSelectService {

	@Autowired
	private WorkesSelectMapper workesSelectMapper;
	
	/**
	 * @author zhang_sguang
	 * @param enterpriseId 第一个参数 企业编号；index 第二个参数 分页展示的页号
	 * @return list：Workes对象集合
	 */
	@Override
	public List<WorkesInformation> queryAllWorker(String enterpriseId, Integer index) {
		// TODO Auto-generated method stub
		if (index ==null||index==0) {
			index = 1;
		}
		return workesSelectMapper.queryAllWorker(enterpriseId,index-1);
	}
	
	/**
	 * @author zhang_sguang
	 * @return pageNum:分页展示总页数
	 */
	@Override
	public Integer queryCount() {
		// TODO Auto-generated method stub
		
		return workesSelectMapper.queryCount();
	}

	
}
